package com.homework.homework2;import java.io.FileOutputStream;import java.io.InputStream;import java.io.OutputStream;import java.net.Socket;import java.util.Scanner;public class Client {    public static void main(String[] args) throws Exception {        Scanner sc = new Scanner(System.in);        System.out.println("输入下载的文件地址：");        String path = sc.next();        Socket s = new Socket("127.0.0.1",9988);        OutputStream os = s.getOutputStream();        os.write(path.getBytes());        InputStream is = s.getInputStream();        byte[] bs = new byte[1024];        int len;        len = is.read(bs);        String name = new String(bs,0,len);        System.out.println(name);        FileOutputStream fos = new FileOutputStream(name);        while ((len = is.read(bs)) != -1){            fos.write(bs,0,len);        }        sc.close();        fos.close();        s.close();    }}